home *** CD-ROM | disk | FTP | other *** search
-
- // JavaScript wrapper for r3frls.h
- // Auto generated file, do not modify by hand
- // Copyright ⌐ 2004, Realsoft Graphics Oy
-
- var R3_FRLS_H = 1;
- include("real/raytr/r3frbob.js")
- include("oops/r3matrix.js")
-
-
- var R3CLID_FRLIGHTSOURCE = 455;
-
-
-
-
- // Description: The default lighting action done by this class in CASTLIGHT method is the following:
- // 1. The object sends R3FRLSM_EVALUATE message to itself with the same parameters * p1,
- // p2, msg as in CASTLIGHT. The derived light source class should set its typical *
- // information to lightray sample (=p1 param) and then inherit to the parent class. * The
- // following channels should have valid values prior to inheriting: * - Ray direction - R3CLID_RAYCHANNEL.
- // The direction of cast light ray. Set a unit vector! * - Distance - R3CLID_ZCHANNEL.
- // From light ray origin to the target point given in * p2's R3CLID_ASCCHANNEL. * *
- // 2. When the R3FRLSM_EVALUATE message receives this class, the class does the following actions: *
- // - It initializes p1's R3CLID_ILMCHANNEL (light color). * - It moves the target point i.e.
- // R3CLID_ASCCHANNELin p2 to the corresponding channel * in the lightray sample p1. * - It
- // evaluates materials associated with the light source. * - Then it evaluates possible distance weighting
- // function. * * 4. When control returns back from the parent class R3FRLSM_EVALUATE execution, the
- // derived * light source class can find all relevant light information from the ray samples
- // and can * perform whatever further modifications & tricks. * 5. After abovementioned steps, this
- // class calls the appropriate callback function * given in the message parameter defined below. This
- // illuminates the target point.
-
- R3FRLSM_CASTLIGHT = 455000;
-
- function mR3FRLSM_CASTLIGHT() {
- DoA(this.r3obj, 455000, 0, R3TID_INTEGER, 0);
- }
-
-
-
-
- R3FRLSA_Shadows = 455500;
- function SetR3FRLSA_Shadows(value) {
- R3Set(this.r3obj, R3FRLSA_Shadows, value, R3TID_INTEGER, 0);
- }
-
- function GetR3FRLSA_Shadows() {
- return R3Get(this.r3obj, R3FRLSA_Shadows, R3TID_INTEGER, 0);
- }
-
- R3FRLSA_Color = 455501;
- function SetR3FRLSA_Color(value) {
- R3Set(this.r3obj, R3FRLSA_Color, value, R3TID_COLOR_RGB, 0);
- }
-
- R3FRLSA_WorldSize = 455502;
- function SetR3FRLSA_WorldSize(value) {
- R3Set(this.r3obj, R3FRLSA_WorldSize, value, R3TID_FLOAT, 0);
- }
-
- R3FRLSA_Falloff = 455503;
- function SetR3FRLSA_Falloff(value) {
- R3Set(this.r3obj, R3FRLSA_Falloff, value, R3TID_INTEGER, 0);
- }
-
- R3FRLSA_Radius = 455504;
- function SetR3FRLSA_Radius(value) {
- R3Set(this.r3obj, R3FRLSA_Radius, value, R3TID_FLOAT, 0);
- }
-
- R3FRLSA_HasFixedPosition = 455505;
- function GetR3FRLSA_HasFixedPosition() {
- return R3Get(this.r3obj, R3FRLSA_HasFixedPosition, R3TID_INTEGER, 0);
- }
-
- R3FRLSA_Position = 455506;
- function GetR3FRLSA_Position() {
- return R3Get(this.r3obj, R3FRLSA_Position, R3TID_VECTOR, 0);
- }
-
- R3FRLSA_HasFiniteAngle = 455507;
- function GetR3FRLSA_HasFiniteAngle() {
- return R3Get(this.r3obj, R3FRLSA_HasFiniteAngle, R3TID_INTEGER, 0);
- }
-
- R3FRLSA_Angle = 455508;
- function GetR3FRLSA_Angle() {
- return R3Get(this.r3obj, R3FRLSA_Angle, R3TID_FLOAT, 0);
- }
-
- R3FRLSA_Direction = 455509;
- function GetR3FRLSA_Direction() {
- return R3Get(this.r3obj, R3FRLSA_Direction, R3TID_VECTOR, 0);
- }
-
- R3FRLSA_VolumeLighting = 455510;
- function SetR3FRLSA_VolumeLighting(value) {
- R3Set(this.r3obj, R3FRLSA_VolumeLighting, value, R3TID_INTEGER, 0);
- }
-
- function GetR3FRLSA_VolumeLighting() {
- return R3Get(this.r3obj, R3FRLSA_VolumeLighting, R3TID_INTEGER, 0);
- }
-
- R3FRLSA_DiffuseOnly = 455511;
- function SetR3FRLSA_DiffuseOnly(value) {
- R3Set(this.r3obj, R3FRLSA_DiffuseOnly, value, R3TID_INTEGER, 0);
- }
-
- function GetR3FRLSA_DiffuseOnly() {
- return R3Get(this.r3obj, R3FRLSA_DiffuseOnly, R3TID_INTEGER, 0);
- }
-
- R3FRLSA_HasFixedDirection = 455512;
- function GetR3FRLSA_HasFixedDirection() {
- return R3Get(this.r3obj, R3FRLSA_HasFixedDirection, R3TID_INTEGER, 0);
- }
-
- R3FRLSA_CreatesCaustics = 455513;
- function GetR3FRLSA_CreatesCaustics() {
- return R3Get(this.r3obj, R3FRLSA_CreatesCaustics, R3TID_INTEGER, 0);
- }
-
- var R3LSDW_CONSTANT = 0;
- var R3LSDW_LOCAL = 1;
- var R3LSDW_INVLIN = 2;
- var R3LSDW_INVSQR = 3;
-
-
- function r3Frlightsource () {
- this.base = r3God;
- if(arguments.length) {
- this.base(R3CLID_FRLIGHTSOURCE, arguments);
- }
- // Methods
- this.CASTLIGHT=mR3FRLSM_CASTLIGHT;
-
- // Attributes
- this.GetShadows=GetR3FRLSA_Shadows;
- this.SetShadows=SetR3FRLSA_Shadows;
- this.SetColor=SetR3FRLSA_Color;
- this.SetWorldSize=SetR3FRLSA_WorldSize;
- this.SetFalloff=SetR3FRLSA_Falloff;
- this.SetRadius=SetR3FRLSA_Radius;
- this.GetHasFixedPosition=GetR3FRLSA_HasFixedPosition;
- this.GetPosition=GetR3FRLSA_Position;
- this.GetHasFiniteAngle=GetR3FRLSA_HasFiniteAngle;
- this.GetAngle=GetR3FRLSA_Angle;
- this.GetDirection=GetR3FRLSA_Direction;
- this.GetVolumeLighting=GetR3FRLSA_VolumeLighting;
- this.SetVolumeLighting=SetR3FRLSA_VolumeLighting;
- this.GetDiffuseOnly=GetR3FRLSA_DiffuseOnly;
- this.SetDiffuseOnly=SetR3FRLSA_DiffuseOnly;
- this.GetHasFixedDirection=GetR3FRLSA_HasFixedDirection;
- this.GetCreatesCaustics=GetR3FRLSA_CreatesCaustics;
- }
-
- r3Frlightsource.prototype=new r3Frbaseobject;
- // r3frls.h_H